package com.utils;

public class ConvertType {

	public ConvertType() {

	}

	public String getTypeSQL(String typeIn) throws TypeException {

		if (typeIn.equals("String"))
			return "TEXT";
		if (typeIn.equals("int")|| typeIn.equals("long"))
			return "INTEGER";
		if (typeIn.equals("float")|| typeIn.equals("double"))
			return "REAL";
		else
			throw new TypeException();

	}

	public String getTypeJAVA(String typeIn) throws TypeException {

		if (typeIn.equals("TEXT"))
			return "String";
		if (typeIn.equals("INTEGER"))
			return "long";
		if (typeIn.equals("REAL"))
			return "double";
		else
			throw new TypeException();

	}
	
	public String getNameColumn(String champ){
		
		String cl=champ.toUpperCase();
		
		return cl;
		
	}

}
